JavaScript can write directly into the HTML output stream:
You can only use document.write in the HTML output. If you use it after the document has loaded (e.g. in a function), the whole document will be overwritten.
A Paragraph.
A Paragraph.
Note: myFunction is stored in an external file called "myScript.js".